import request from '@/utils/request'

export function list (parameter) {
  return request({
    url: '/boss/project/manage/config/listRecord',
    method: 'post',
    data: parameter
  })
}
export function getProjectList (parameter) {
  return request({
    url: '/boss/project/info/list',
    method: 'post',
    data: parameter
  })
}
export function getProjectDetail (parameter) {
  return request({
    url: '/boss/project/info/detail',
    method: 'post',
    data: parameter
  })
}
export function getProjectAdd (parameter) {
  return request({
    url: '/boss/project/info/add',
    method: 'post',
    data: parameter
  })
}
export function getProjectUpdate (parameter) {
  return request({
    url: '/boss/project/info/update',
    method: 'post',
    data: parameter
  })
}
export function getProjectDelete (parameter) {
  return request({
    url: '/boss/project/info/delete',
    method: 'post',
    data: parameter
  })
}
export function getTemplateList (parameter) {
  return request({
    url: '/boss/project/manage/config/listCon',
    method: 'post',
    data: parameter
  })
}
export function switchUpdateCon (parameter) {
  return request({
    url: '/boss/project/manage/config/updateCon',
    method: 'post',
    data: parameter
  })
}
export function getShowResearcher (parameter) {
  return request({
    url: '/boss/project/manage/config/showResearcher',
    method: 'post',
    data: parameter
  })
}
export function getAddContract (parameter) {
  return request({
    url: '/boss/project/manage/config/addContract',
    method: 'post',
    data: parameter
  })
}
export function contractConfig (parameter) {
  return request({
    url: '/boss/project/manage/config/contractConfig',
    method: 'post',
    data: parameter
  })
}
export function getAddCon (parameter) {
  return request({
    url: '/boss/project/manage/config/addCon',
    method: 'post',
    data: parameter
  })
}
export function getProName (parameter) {
  return request({
    url: '/boss/project/info/show',
    method: 'post',
    data: parameter
  })
}
export function showUserNo (parameter) {
  return request({
    url: '/boss/project/manage/config/showUserNo',
    method: 'post',
    data: parameter
  })
}
export function exportContract (parameter) {
  return request({
    url: '/boss/project/manage/config/exportContract',
    method: 'post',
    data: parameter,
    responseType: 'blob'
  })
}
export function updatePDFConfig (parameter) {
  return request({
    url: '/boss/project/manage/config/updatePDFConfig',
    method: 'post',
    data: parameter
  })
}

/**
 * 取消合同
 * @param parameter
 * @param parameter.id
 * @param parameter.proId
 * @return {*}
 */
export function apiCancelContract (parameter) {
  return request({
    url: '/boss/project/manage/config/cancelContract',
    method: 'post',
    data: parameter
  })
}
